package com.bjpowernode.dataservice.impl;

import com.bjpowernode.mapper.RechargeRecordMapper;
import com.bjpowernode.model.RechargeRecord;
import com.bjpowernode.service.RechargeService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;
import java.util.List;

@DubboService
public class RechargeServiceImpl implements RechargeService {

    @Resource
    private RechargeRecordMapper rechargeRecordMapper;

    @Override
    public List<RechargeRecord> queryRechargeRecordByUid(Integer uid) {
        return rechargeRecordMapper.selectRechargeRecordByUid(uid);
    }

    /**
     * 添加充值记录
     * @param rechargeRecord
     * @return
     */
    @Override
    public int addRecharge(RechargeRecord rechargeRecord) {

        return rechargeRecordMapper.insertSelective(rechargeRecord);
    }
}
